package com.mapper;

import com.pojo.Person;
import org.apache.ibatis.annotations.One;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import javax.annotation.Resources;

/**
* @author ASUS
* @description 针对表【tb_person】的数据库操作Mapper
* @createDate 2024-11-12 10:41:06
* @Entity com.pojo.Person
*/
public interface PersonMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Person record);

    int insertSelective(Person record);

    Person selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Person record);

    int updateByPrimaryKey(Person record);

    Person findPersonById(Integer i);

    @Select("select * from tb_person where id=#{id}")
    @Results({@Result(column = "card_id",property = "card",
    one = @One(select = "com.mapper.IdCardMapper.selectIdCardById"))})
    Person selectPersonById(int id);
}
